dnf install -y nfs-utils nvidia-container-toolkit nvidia-container-runtime

# 显卡驱动（CUDA驱动）：向下兼容的，可以一直保持最新。
wget wget https://developer.download.nvidia.com/compute/cuda/12.6.1/local_installers/cuda_12.6.1_560.35.03_linux.run
# /etc/profile文件

echo export PATH=${PATH}:/usr/local/cuda-12.6/bin >>/etc/profile
echo export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda-12.6/lib64 >>/etc/profile
source /etc/profile
nvcc -V

grep nvidia /var/lib/rancher/k3s/agent/etc/containerd/config.toml

# 修改 /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl
# default_runtime_name = nvidia

# 虚拟机cpu设置直通

# master 安装 k8s-device-pling
kubectl create -f https://ghproxy.net/https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/main/deployments/static/nvidia-device-plugin.yml

# 安装 gpu-operator 多块卡管理 和 多个pod 分时使用GPU 没装 只能 单个pod独占GPU
